package com.beyondsoft.sabg.edu.model.tree;

import cn.hutool.core.collection.CollUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author Mo cr
 * @Date 2023/12/7
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PrivilegeTree {
    private Long key;
    private String title;
    private String code;
    private String type;
    private String path;
    private Boolean hidden;
    private Long parentId;
    private Boolean canAccess;
    private List<PrivilegeTree> children;
    public boolean hasChildren(){
        if(CollUtil.isNotEmpty(this.children)){
            return true;
        }
        return false;
    }
}
